﻿Public Class frmLogin
    Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
        Running = False
        twine.Abort()
        Application.Exit()
        End
    End Sub
    Private Sub cmdOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOk.Click
        If Not AttemptLogin(extend.Base64Sha1(txtUser.Text), extend.Base64Sha1(txtPassword.Text)) Then
            Beep()
        Else
            ActiveUser.PasswordHash = extend.Base64Sha1(txtPassword.Text)
            ActiveUser.UserName = txtUser.Text
            Me.Dispose()
        End If
    End Sub
    Private Sub frmLogin_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        e.Cancel = True
    End Sub
End Class
